package com.liang.generator.blog.controller;


import com.liang.generator.blog.entity.Admin;
import com.liang.generator.blog.service.AdminService;
import com.liang.pojo.User;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 狂神说
 * @since 2021-08-21
 */
@RestController
@RequestMapping("/blog/admin")
public class AdminController {

    //只要我们的接口中，返回值中存在实体类，他就会被扫描到Swagger中
    @PostMapping(value = "/user")
    @ApiOperation("User控制类")
    public User user(){
        return new User();
    }

    //只要我们的接口中，返回值中存在实体类，他就会被扫描到Swagger中
    @PostMapping(value = "/admin")
    @ApiOperation("Admin控制类")
    public Admin admin(){
        return new Admin();
    }
}

